﻿using System.Windows.Forms;

namespace Toolbar
{
    public class ToolStripEx : ToolStrip
    {

        public ToolStripEx()
        {
        }

        public ToolStripEx(params ToolStripItem[] items)
            : base(items)
        {
        }

        protected override void WndProc(ref Message m)
        {
            //WM_MOUSEACTIVATE = 0x21
            if (m.Msg == 0x21 && CanFocus && !Focused)
            {
                Focus();
            }
            base.WndProc(ref m);
        }
    }
}